#set(seoTitle="用户登录")
#@layout()
#define main()
#define css()
<link rel="stylesheet" type="text/css" href="/static/css/login.css">
#end
<!-- 内容区域 -->
	<div id="wrapper">
		<div class="aw-login-box ">
			<div class="mod-body clearfix row">
				<div class="content col-sm-12 col-md-9">
					<a href="/">
						<img height="80px" src="/static/img/logo.png" alt=""/>
					</a>
					<h2 style="color: white">拾光社区</h2>
					<form id="login_form" method="post" action="/login/doLogin?returnUrl=#(returnUrl)">
						<ul>
							<li>
								<input type="text" id=email class="form-control" placeholder="邮箱 "name="email" />
							</li>
							<li>
								<input type="password" id="password" class="form-control"placeholder="密码" name="password" />
							</li>
							<li class="alert alert-danger hide error_message">
								<i class="icon icon-delete"></i>
								<em></em>
							</li>
							<li class="last">
								<label>
									<input type="checkbox" value="1" name="keepLogin" id="keepLogin" />
									记住我
								</label>
								<!--<a href="/login/findPsw">&nbsp;&nbsp;忘记密码</a>-->
								<input type="submit" class="login btn btn-small btn-primary" value="登录"/>
						
							</li>
						</ul>
					</form>
				</div>
				<div class="side-bar col-sm-12 col-md-3">
					<h3></h3>
					<a href="https://gitee.com/hkq15/hibbs.git" target="_blank" class="btn btn-block btn-github">
						<i class="icon icon-github"></i>本站源码下载
					</a>
					<a target="_blank" href="https://mp.weixin.qq.com/s?__biz=MzUxMTcwMDY1OQ==&mid=2247483792&idx=1&sn=21b2198899d259166edde727404ad024&chksm=f96efa4cce19735a0f428bb21fb8a89dd5e55825adabb6fe90b184d54630b44b1aed6ae6584f#rd" class="btn btn-block btn-twitter">
						<i class="icon icon-help"></i>官方公众号
					</a>
				</div>
			</div>
			<div class="mod-footer">
				<span>还没有账号?</span>&nbsp;&nbsp;
				<a href="/login/register/">立即注册</a>
				&nbsp;&nbsp;•&nbsp;&nbsp;
				<a href="/">游客访问</a>
			</div>
		</div>
	</div>
<!-- 内容区域end -->
#end

#define js()

<script type="text/javascript" src="/static/jquery_form/jquery.form.min.js"></script>
<script type="text/javascript" src="/static/layer/layer/layer.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#login_form").ajaxForm({
			dataType: "json"
			, beforeSubmit: function(formData, jqForm, options) {
				// 表单提交之前回调
			}
			, success: function(ret) {
				if(ret.state == "ok") {
					location.href = ret.returnUrl;
				} else {
					layer.msg(ret.msg, {
								shift: 6
								, shade: 0.3
								, time: 7000			// 0 为不自动关闭窗口
								, offset: "165px"
								, closeBtn: 1
								, shadeClose: true
							} , function() {
							}
					);
				}
			}
			, error: function(ret) { }              // ret.status != 200 时回调
			, complete: function(ret) { }       // 无论是 success 还是 error，最终都会被回调
		});
	});	
</script>
#end